//
//  ZYDeviceSwitchView.h
//  YiLin
//
//  Created by Zyark on 2018/6/3.
//  Copyright © 2018年 Zyark. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ZYDevice.h"

/**设备开关View普通高度*/
#define DEVICE_SWITCH_VIEW_COMMON_HEIGHT ZYSCREEN_H * 0.2
/**设备开关View地暖高度*/
#define DEVICE_SWITCH_VIEW_RFH_HEIGHT ZYSCREEN_H * 0.1

@class ZYDeviceSwitchView;
@class ZYDevice;
@protocol ZYDeviceSwitchViewDelegate <NSObject>
@optional
/**
 风速选择
 @param deviceSwitchView 当前view
 @param type ZYWindSpeedType
 @param device 当前设备
 @param button 点击的按钮
 */
-(void)deviceSwitchView:(ZYDeviceSwitchView *)deviceSwitchView setWindSpeedType:(ZYWindSpeedType)type device:(ZYDevice *)device  button:(UIButton *)button;


/**
 设备开关
 @param deviceSwitchView 当前view
 @param isOpen 是否开启
 @param device 当前设备
 @param switchBtn 选择
 */
-(void)deviceSwitchView:(ZYDeviceSwitchView *)deviceSwitchView setDeviceOpen:(BOOL)isOpen device:(ZYDevice *)device switchBtn:(UISwitch *)switchBtn;

/**
 设备锁定
 @param deviceSwitchView 当前view
 @param isLock 是否锁定
 @param device 当前设备
 @param switchBtn 选择
 */
-(void)deviceSwitchView:(ZYDeviceSwitchView *)deviceSwitchView setDeviceLock:(BOOL)isLock device:(ZYDevice *)device switchBtn:(UISwitch *)switchBtn;
@end

@interface ZYDeviceSwitchView : UIView

/**
 初始化View标题
 */
-(void)setupTitle;
@property(nonatomic,assign) id<ZYDeviceSwitchViewDelegate> delegate;
@property(nonatomic,strong) ZYDevice *device;
@end
